#!/usr/bin/env python3
# -*- coding:utf-8 -*-
###
# File: read&write_file.py
# -----
# Description: 读写
# -----
# Created  By: Aim 2020-02-01 14:35:26
# Modified By: Aim 2020-02-01 14:55:04
# -----
# HISTORY:
# Date      	By	Comments
# ----------	---	----------------------------------------------------------
###

# try:
#     f = open('/Users/aimin/www/learn-python3/io/test.txt', 'r')
#     print(f.read())
# finally:
#     if f:
#         f.close()

# with open('/Users/aimin/www/learn-python3/io/test.txt', 'r') as f:
#     # print(f.read())
#     for line in f.readlines():
#         print(line.strip())

f = open('/Users/aimin/www/learn-python3/io/test.txt', 'w')
f.write('He is Aix')
f.close()